
 cmake_minimum_required(VERSION 3.16)
 project(Server VERSION 0.0.1)
  
 find_package(OpenCV 4 REQUIRED)
 
 
 find_package(Boost 1.75 COMPONENTS filesystem  thread  system )
 find_package(Protobuf REQUIRED)
 include_directories(${Protobuf_INCLUDE_DIRS})
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
 protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ../Image.proto)
 
  
 
 SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall  -g -O0") 
 
 set(CMAKE_CXX_FLAGS  "-fPIC ")   
 
  
 
 include_directories( ${OpenCV_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) 
 add_executable(server.out session.cpp main.cpp server.cpp   session.cpp Image.pb.cc  ${PROTO_SRCS} ${PROTO_HDRS})
  
 target_link_libraries(server.out ${OpenCV_LIBS} ${Boost_LIBRARIES} ${Protobuf_LIBRARIES})
 
 
 
 
 
  

